package com.atguigui.gmall2020.realtime.publisher.service.impl;


import com.atguigui.gmall2020.realtime.publisher.bean.VisitorStats;
import com.atguigui.gmall2020.realtime.publisher.mapper.VisitorStatsMapper;
import com.atguigui.gmall2020.realtime.publisher.service.VisitorStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

@Service
public class VisitorStatsServiceImpl implements VisitorStatsService {
// extends ServiceImpl<MidStatsMapper, MidStats>
    @Autowired
    VisitorStatsMapper visitorStatsMapper;

    @Override
    public List<VisitorStats> getMidStatsByNewFlag(int date) {
        return visitorStatsMapper.selectMidStatsByNewFlag(date);
    }

    @Override
    public List<VisitorStats> getMidStatsGroupbyHourNewFlag(int date) {
        return visitorStatsMapper.selectMidStatsGroupbyHourNewFlag(date);
    }

    @Override
    public Long getPv(int date) {
        return visitorStatsMapper.selectPv(date);
    }

    @Override
    public Long getUv(int date) {
        return visitorStatsMapper.selectUv(date);
    }
}
